home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / comm / news / slrn-bin.lha / slrn / doc / tm / slrnfuns / keys.tm < prev    next >
Text File  |  1999-04-27  |  3KB  |  97 lines

  1. \function{call}
  2. \synopsis{-}
  3. \usage{Void call (String fun)}
  4. \description
  5.    This function is used to execute an interactive slrn internal
  6.    function.  Such functions are used with \var{setkey} statements in the
  7.    \var{.slrnrc} startup files.
  8. \seealso{definekey, undefinekey, set_prefix_argument}
  9. \done
  10.  
  11. \function{definekey}
  12. \synopsis{-}
  13. \usage{definekey (String fun, String key, String km)}
  14. \description
  15.    This function is used to bind a key sequence specified by \var{key} to
  16.    a function \var{fun} in the keymap \var{km}.  Here \var{fun} can be any
  17.    predefined slang function that takes 0 arguments and returns void.
  18.    The parameter \var{km} must be either "article", "group", or "readline".
  19. \seealso{undefinekey, call, set_prefix_argument}
  20. \done
  21.  
  22. \function{get_prefix_arg}
  23. \synopsis{Get the value of the prefix argument}
  24. \usage{Int_Type get_prefix_arg ()}
  25. \description
  26.    The \var{get_prefix_arg} function returns the value of the prefix
  27.    argument. If no prefix argument has been set, the function returns
  28.    \var{-1}, which is an impossible value for the prefix argument.
  29. \notes
  30.    The prefix argument is specified interactively via the ESC key
  31.    followed by one or more digits that determine value of the prefix
  32.    argument.
  33.    
  34.    This concept has been borrowed from the emacs text editor.
  35. \seealso{set_prefix_argument, reset_prefix_arg}
  36. \done
  37.  
  38. \function{getkey}
  39. \synopsis{-}
  40. \usage{Integer getkey ()}
  41. \description
  42.    Read a character from the terminal and returns its value.
  43.    Note: Function and arrow keys usually return more than one character.
  44. \seealso{ungetkey, input_pending, read_mini}
  45. \done
  46.  
  47. \function{input_pending}
  48. \synopsis{-}
  49. \usage{Integer input_pending (Integer tsecs)}
  50. \description
  51.    This function checks for keyboard input.  Its argument specifies
  52.    the number of tenths of a second to wait.  It returns 0 if no input
  53.    is available or a non-sero value if input is available.
  54. \seealso{getkey, ungetkey}
  55. \done
  56.  
  57. \function{reset_prefix_arg}
  58. \synopsis{Cancel the prefix argument}
  59. \usage{Void reset_prefix_arg ()}
  60. \description
  61.    The \var{reset_prefix_arg} function may be used to reset the prefix
  62.    argument.  This is usually necessary after calling to keep the
  63.    argument from propagating to other functions.
  64. \seealso{get_prefix_arg, set_prefix_argument}
  65. \done
  66.  
  67. \function{set_prefix_argument}
  68. \synopsis{-}
  69. \usage{Void set_prefix_argument (Integer val)}
  70. \description
  71.    The \var{set_prefix_argument} function may be used to set the prefix
  72.    argument to \var{val}.  It is mainly used immediately before
  73.    \var{calling}
  74.    internal functions which take prefix arguments.
  75. \seealso{call}
  76. \done
  77.  
  78. \function{undefinekey}
  79. \synopsis{-}
  80. \usage{Void undefinekey (String key, String map)}
  81. \description
  82.    This function undefineds a key sequence specified by \var{key} from
  83.    keymap \var{map}.
  84. \seealso{definekey}
  85. \done
  86.  
  87. \function{ungetkey}
  88. \synopsis{-}
  89. \usage{Void ungetkey (Integer ch)}
  90. \description
  91.    This function pushes the character \var{ch} back upon the input stream
  92.    such that the next call to \var{getkey} will return it.  It is possible
  93.    to push several characters back.
  94. \seealso{getkey}
  95. \done
  96.  
  97.